package com.pattern;

public class SingletonClassDoubleCheck {
    private static SingletonClassDoubleCheck singleton;
    private SingletonClassDoubleCheck(){};
    
    public static SingletonClassDoubleCheck getInstance(){
        if(singleton==null){
            synchronized (SingletonClassDoubleCheck.class) {
                if (singleton == null) {
                    singleton = new SingletonClassDoubleCheck();
                }
            }
        }
        return singleton;
    }
}
